package com.larly.model.enums.user;

import lombok.Getter;

@Getter
public enum UserStatusEnum {
    NORMAL(0, "正常"),
    DELETED(1, "删除");

    private Integer code;
    private String value;

    UserStatusEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getValueByCode(Integer code) {
        for (UserStatusEnum value : UserStatusEnum.values()) {
            if (value.code.equals(code)) {
                return value.value;
            }
        }
        return null;
    }
}
